package com.rz.admin.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.rz.admin.entity.vo.GroupRes;
import com.rz.core.common.model.PageEntity;

import java.time.LocalDateTime;
import java.util.List;

public class Group extends PageEntity {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private Integer parentId;
    @TableField(update="now()",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime crteTime;
    private Integer crteAdminId;
    private Integer orgId;

    @TableField(exist = false)
    private List<Group> children;

    @TableField(exist = false)
    private List<GroupRes> resInfo;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public LocalDateTime getCrteTime() {
        return crteTime;
    }

    public void setCrteTime(LocalDateTime crteTime) {
        this.crteTime = crteTime;
    }

    public Integer getCrteAdminId() {
        return crteAdminId;
    }

    public void setCrteAdminId(Integer crteAdminId) {
        this.crteAdminId = crteAdminId;
    }

    public Integer getOrgId() {
        return orgId;
    }

    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }

    public List<Group> getChildren() {
        return children;
    }

    public void setChildren(List<Group> children) {
        this.children = children;
    }

    public List<GroupRes> getResInfo() {
        return resInfo;
    }

    public void setResInfo(List<GroupRes> resInfo) {
        this.resInfo = resInfo;
    }
}
